package uk.ac.shef.ecomm.tests;

import uk.ac.shef.ecomm.*;
import uk.ac.shef.ecomm.jdbc.mysql.*;

public class TestRegisteration 
{
	public static void main(String[] args)
	{
		//create Researcher instance
		Researcher r = new Researcher();
		r.setName("Saeed");
		r.setEmail("res2@gmail.com");
		r.setPass("saeed");
		//create Participant instance
		Participant p = new Participant();
		p.setName("Saeed");
		p.setPass("pass1");
		p.setLanguage("arabic");
		p.setEmail("part2@gmail.com");
		p.setDOB(java.sql.Date.valueOf("1976-06-28"));
		p.setGender("M");
		p.setIsSmoker(false);
		//
		ResearcherRegisteration re = new ResearcherRegisteration();
		ParticipantRegisteration re2 = new ParticipantRegisteration();
		
		//if (re.register(r) == true)
		if (re2.register(p) == true)
		{
			System.out.println("success");
			re.close();
		}
		else
		{
			System.out.println("fail");
		}
	}
}
